<template>
	<div id="app">
		<navigation>
			<router-view v-if="isRouterAlive" />
		</navigation>
	</div>
</template>

<script>
	import 'vant/lib/style/base.less';
	import './App.less';
	import axios from 'axios';

	window.axios = axios;

	export default {
		name: 'App',
		provide () {
			return {
				reload: this.reload
			};
		},
		data () {
			return {
				isRouterAlive: true
			};
		},
		computed: {
			keepAliveList () {
				return this.$store.getters.getKeepAlive;
			}
		},
		methods: {
			reload () {
				this.isRouterAlive = false;
				this.$nextTick(function () {
					this.isRouterAlive = true;
				});
			}
		}
	};
</script>

<style lang="less" scoped>
	#app {
		height: 100%;
		overflow: auto;
		font-size: 16px;
	}
</style>
